<template>
    <div class="asider-container">
        <ul class="u-l">
            <li v-for="item in nav" :key="item" class="l-i">
                <router-link :to="item.path" class="link">{{ item.name }}</router-link>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
    name: "common-aside",
    data() {
        return {
            nav: [
                {
                    path: "/main",
                    name: "首页"
                }, {
                    path: "/main/shop",
                    name: "购物管理",
                }, {
                    path: "/main/mes",
                    name: "用户管理",
                }, {
                    path: "/main/error",
                    name: "404页面",
                }]
        }
    }
}
</script>

<style>
.u-l {
    width: 300px;
    padding: 50px 50px;
}

.l-i {
    width: 200px;
    height: 40px;
    line-height: 0;
    text-align: center;
    list-style: none;
    padding: 30px;
    box-sizing: border-box;
}

.l-i:hover {
    background-color: brown;
}

.l-i:hover .link {
    color: #fff;
    text-decoration: none;
}

.link {
    font-weight: bold;
    color: #000;
    font-size: 20px;
}

.asider-container {
    height: 755px;
    background-color: #efefef;
}
</style>